package com.library.bookmanagement.service;

import com.github.pagehelper.Page;
import com.library.bookmanagement.entity.*;
import com.library.bookmanagement.util.ResultUtil;

import java.util.List;
import java.util.Map;

/**
 * @author ：ZXM
 * @date ：Created in 2020/5/11 15:37
 * @description：读者service接口
 */
public interface UserService {

    ResultUtil borrowBookByReadKey(Integer userId, Integer bookId);

    ResultUtil editUserById(User user);

    ResultUtil<Map<String,Object>> queryReadListByUserId(Integer pageNum, Integer pageSize, Integer userId);

    ResultUtil backBookByReadKey(Integer userId, Integer bookId);

    ResultUtil reserveBookByReserveKey(Integer userId, Integer bookId);

    ResultUtil<List<Reserve>> queryReserveListByUserId(Integer userId);

    ResultUtil cancelReserveByKey(Integer userId, Integer bookId);

    ResultUtil<User> queryUserByName(String username);

    ResultUtil editUserPassword(Integer userId,String oldPassword,String newPassword);

    void editUserImg(String username,String filename);

    ResultUtil<List<Overdue>> overdueListByUserId(Integer userId);

    ResultUtil backOverdueBookByKey(ReaderKey overdueKey);
}
